<?php
/*
 * 分页部分
 * 只有在页数超过1的时候才会显示出来
 * Created on 2012-10-6
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
 if($total_pages > 1)
 {
?>
<div id="page" class="x-panel-bbar x-panel-body" style="border:0 solid #99bbe8;">
	<div  class="x-toolbar x-small-editor">
	<table cellspacing="0"><tbody><tr>
			<td>

				<form  class="form-horizontal" action="<?php echo $page_first?>" method="post" >
							<input id="inputSuccess" type="hidden" name="session_user_id" value="<?php echo $_SESSION['user_id']; ?>"/>
							<input id="inputSuccess" type="hidden" name="session_user_name" value="<?php echo $_SESSION['user_name']; ?>"/>
							<input id="inputSuccess" type="hidden" name="session_role_id" value="<?php echo $_SESSION['role_id']; ?>"/>
							<input id="inputSuccess" type="hidden" name="session_logged_in" value="<?php echo $_SESSION['logged_in']; ?>"/>
							<input class="btn-default" type=submit name="session_first" value="首页"/>
				</form>
            </td>
			<td>

				<form  class="form-horizontal" action="<?php echo $page_prev?>" method="post" >
							<input id="inputSuccess" type="hidden" name="session_user_id" value="<?php echo $_SESSION['user_id']; ?>"/>
							<input id="inputSuccess" type="hidden" name="session_user_name" value="<?php echo $_SESSION['user_name']; ?>"/>
							<input id="inputSuccess" type="hidden" name="session_role_id" value="<?php echo $_SESSION['role_id']; ?>"/>
							<input id="inputSuccess" type="hidden" name="session_logged_in" value="<?php echo $_SESSION['logged_in']; ?>"/>
							<input class="btn-default" type=submit name="session_Prev" value="上一页"/>

				</form>
            </td>

			<td>

				<form  class="form-horizontal" action="<?php echo $page_next?>" method="post" >
							<input id="inputSuccess" type="hidden" name="session_user_id" value="<?php echo $_SESSION['user_id']; ?>"/>
							<input id="inputSuccess" type="hidden" name="session_user_name" value="<?php echo $_SESSION['user_name']; ?>"/>
							<input id="inputSuccess" type="hidden" name="session_role_id" value="<?php echo $_SESSION['role_id']; ?>"/>
							<input id="inputSuccess" type="hidden" name="session_logged_in" value="<?php echo $_SESSION['logged_in']; ?>"/>
							<input class="btn-default" type=submit name="session_next" value="下一页"/>
				</form>
			</td>
			<td>
				<form  class="form-horizontal" action="<?php echo $page_last?>" method="post" >
							<input id="inputSuccess" type="hidden" name="session_user_id" value="<?php echo $_SESSION['user_id']; ?>"/>
							<input id="inputSuccess" type="hidden" name="session_user_name" value="<?php echo $_SESSION['user_name']; ?>"/>
							<input id="inputSuccess" type="hidden" name="session_role_id" value="<?php echo $_SESSION['role_id']; ?>"/>
							<input id="inputSuccess" type="hidden" name="session_logged_in" value="<?php echo $_SESSION['logged_in']; ?>"/>
							<input class="btn-default" type=submit name="session_last" value="最后一页"/>
				</form>
            </td>
	<td><span  class="ytb-sep"></span></td>
            <td>
				<form action="<?php echo $cur_page?>" method="post" >
							<input id="inputSuccess" type="hidden" name="session_user_id" value="<?php echo $_SESSION['user_id']; ?>"/>
							<input id="inputSuccess" type="hidden" name="session_user_name" value="<?php echo $_SESSION['user_name']; ?>"/>
							<input id="inputSuccess" type="hidden" name="session_role_id" value="<?php echo $_SESSION['role_id']; ?>"/>
							<input id="inputSuccess" type="hidden" name="session_logged_in" value="<?php echo $_SESSION['logged_in']; ?>"/>
							<input class="btn-default" type=submit name="session_reload" value="刷新"/>
				</form>
            </td>
		</tr>
		<tr>
			<td>Page</td>

			<td><?php echo $page; ?></td>

			<td id="totalPages">of <?php echo $total_pages  ?></td>

		</tr></tbody></table>
	<div id="x-paging-info">当前记录 <?php echo $show_start; ?> - <?php echo $show_end; ?> of <span id="total_rows"><?php echo $total_rows; ?></span></div>
	</div>
	</div>
<?php 
}
?>
